[mirrors]
https://curl.haxx.se/download/curl-7.49.0.tar.lzma

[vars]
filesize=5985374
sha512=3c83b65689cb2cac8962b7f08b1430726a6638b33f4775d25d95506a197a3195799896106bfcd736ca5302a873f8bcfd4aa3d6e1bfe7f49b142f2097447f333f

[deps]
libressl
ca-certificates
zlib

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE" \
CFLAGS="$optcflags" \
LDFLAGS="$optldflags" \
LIBS="-lssl -lcrypto -lz" \
./configure -C \
  --prefix="$butch_prefix" \
  --with-ssl \
  --enable-ipv6 \
  --with-ca-path="$butch_prefix"/etc/ssl/certs \
  --with-random=/dev/urandom $xconfflags

sed -i -e '/SUBDIRS/s:scripts::' Makefile
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
